# -*- coding:utf-8 -*-
# @Time : 2021/2/25 16:42
# @Author : Administrator
# @File : ximalaya.py
# @Software: PyCharm
# @Motto: good good study,day day up

import requests
from parsel import Selector
from loguru import logger
from pathlib import Path
import multiprocessing


def get_response(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36',
        'Referer': 'https://www.ximalaya.com/youshengshu/22963309/180476000',
        'xm-sign': 'dfb9b4b57384bb77c59d4c455347d61a(27)1614242463646(71)1614242464447',
        'Cookie': '_xmLog=h5&0d192222-3f93-4366-8d19-7ce75613b579&2.2.17; x_xmly_traffic=utm_source%253A%2526utm_medium%253A%2526utm_campaign%253A%2526utm_content%253A%2526utm_term%253A%2526utm_from%253A; Hm_lvt_4a7d8ec50cfd6af753c4f8aee3425070=1614242162; Hm_lpvt_4a7d8ec50cfd6af753c4f8aee3425070=1614242328',
        'Host': 'www.ximalaya.com'

    }
    response = requests.get(url=url, headers=headers)
    # response.encoding = response.apparent_encoding
    print(response.text)
    return response


if __name__ == '__main__':
    get_response('https://www.ximalaya.com/youshengshu/22963309/')
